import request from '@/utils/request'

// 双随机巡检管理
export function getList(data) {
    return request({
        url: '/web-api/supervise/patrol/list',
        method: 'get',
        params: data,
    })
}

export function getPatrolList(data) {
    return request({
        url: '/web-api/patrol/task/plan/list',
        method: 'get',
        params: data,
    })
}

// 修改巡检管理
export function editPlan(data) {
    return request({
        url: '/web-api/patrol/task/plan/edit',
        method: 'post',
        data: data
    })
}

// 监管对象
export function getUnitList(data) {
    return request({
        url: '/web-api/supervise/statistics/unit/list',
        method: 'get',
        params: data,
    })
}

// 机构巡检统计
export function getPolling(params) {
    return request({
        url: '/web-api/supervise/statistics/dept/list',
        method: 'get',
        params: params,
    })
}

// 人员巡检统计
export function getUserStatistics(params) {
    return request({
        url: '/web-api/supervise/statistics/user/list',
        method: 'get',
        params: params,
    })
}

// 按行业类型统计
export function getIndustryStatistics(params) {
    return request({
        url: '/web-api/supervise/statistics/industry/list',
        method: 'get',
        params: params,
    })
}

// 按检查类型统计
export function getTypeStatistics(params) {
    return request({
        url: '/web-api/supervise/statistics/type/list',
        method: 'get',
        params: params,
    })
}

// 按事项统计
export function getItemStatistics(params) {
    return request({
        url: '/web-api/supervise/statistics/item/list',
        method: 'get',
        params: params,
    })
}

export function getUserStatistics1(id) {
    return request({
        url: '/web-api/supervise/situation/' + id,
        method: 'get'
    })
}

export function getUserStatistics2(params) {
    return request({
        url: '/web-api/system/obj/list',
        method: 'get',
        params: params,
    })
}

// 智能部门统计
export function functionalDepartments(params) {
    return request({
        url: '/web-api/system/statistical/realtime/dept/case',
        method: 'get',
        params: params,
    })
}

// 分类统计
export function classifiedStatistics(params) {
    return request({
        url: '/web-api/system/statistical/realtime/category/case',
        method: 'get',
        params: params,
    })
}

// 区域统计
export function regionalStatistics(params) {
    return request({
        url: '/web-api/system/statistical/realtime/grid/case',
        method: 'get',
        params: params,
    })
}

// 来源统计
export function sourceStatistics(params) {
    return request({
        url: '/web-api/system/statistical/realtime/source/case',
        method: 'get',
        params: params,
    })
}

// 满意度统计
export function satisfactionStatistics(params) {
    return request({
        url: '/web-api/system/statistical/realtime/dept/visit',
        method: 'get',
        params: params,
    })
}

// 受理员统计
export function acceptorStatistics(params) {
    return request({
        url: '/web-api/system/statistical/realtime/acceptor/case',
        method: 'get',
        params: params,
    })
}

// 部门效能统计
export function deptEfficiency(params) {
    return request({
        url: '/web-api/system/statistical/supervise/realtime/dept/efficiency',
        method: 'get',
        params: params,
    })
}

// 部门巡查统计
export function deptPatrol(params) {
    return request({
        url: '/web-api/system/statistical/supervise/realtime/dept/patrol',
        method: 'get',
        params: params,
    })
}

// 个人巡查统计
export function personalPatrol(params) {
    return request({
        url: '/web-api/system/statistical/supervise/realtime/user/patrol',
        method: 'get',
        params: params,
    })
}

// 个人效能统计
export function personalEfficiency(params) {
    return request({
        url: '/web-api/system/statistical/supervise/realtime/user/efficiency',
        method: 'get',
        params: params,
    })
}

// 效能统计详情
export function deptEfficiencyDetailed(params) {
    return request({
        url: '/web-api/system/statistical/supervise/realtime/efficiency/detailed',
        method: 'get',
        params: params,
    })
}